
  <div class="x_panel">
    <div class="x_content" style="display: block;">
      <!--条件过滤-->
      <form action="" id="J_filter_form" class="form-inline">
        <div class="form-group">
          <label class="control-label">分类名称</label>
          <input type="text" class="form-control" name="form[attr_name]" value="{$query.attr_name|default:''}">
        </div>
        <div class="form-group">
          <button class="btn btn-primary" style="margin-top: 5px;">搜索</button>
        </div>
      </form>
      <!-- /条件过滤-->
      <div class="nav navbar-right panel_toolbox">
        <a class="fa fa-plus" href="/attribute/add.html"> 新增大类</a>
      </div>
      <br><br>
      <!--表格主体内容-->
      <div class="cont">
        <table class="table table-bordered table-striped">
          <thead>
          <tr>
            <th width="100px">序号</th>
            <th>分类名称</th>
            <th>排序</th>
            <th>操作</th>
          </tr>
          </thead>
          <tbody>
          {foreach $attributes.lists as $attribute}
          <tr>
            <td>{$attribute.attr_id}</td>
            <td>{$attribute.attr_name}</td>
            <td>{$attribute.attr_sort}</td>
            <td>
              <div class="x_content">
                <a class="btn btn-success btn-xs" href="{eval U(['attribute/sub-index','attr_id'=>$attribute.attr_id])}"> 展开小类</a>
                <a class="btn btn-primary btn-xs" href="{eval U(['attribute/edit','attr_id'=>$attribute.attr_id])}"> 编辑</a>
                <button class="btn btn-danger btn-xs" data-toggle="dropdown">删除
                  <i class="icon-angle-down"></i></button>
                <ul class="dropdown-menu">
                  <li><a href="{eval U(['attribute/delete','attr_id'=>$attribute.attr_id])}">确定</a></li>
                  <li><a href="javascript:;">取消</a></li>
                </ul>
              </div>
            </td>
          </tr>
          {/foreach}
          </tbody>
        </table>
        <!--分页-->

        {Yii::$app->view->render('/com/pager.php',['pager'=>$attributes['pager']])}
      </div>
    </div>
  </div>

  <!-- 页面底部 -->
  <!--<footer>
      <div class="clearfix"></div>
  </footer>-->
  <!-- /页面底部 -->